<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCmsActivityRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('activity_com_red_packet_log', function (Blueprint $table) {
            $table->engine='MyISAM';
            $table->increments('id')->unsigned()->comment('自动增长主键');;
            $table->integer('com_uid')->unsigned()->index('com_uid')->default(0)->comment('所属企业用户id');
            $table->integer('activity_id')->unsigned()->index('activity_id')->default(0)->comment('活动id');
            $table->unsignedSmallInteger('frequency')->default(1)->comment('分享次数');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('activity_com_red_packet_log');
    }
}
